package com.walker.spring.main;

import com.walker.spring.config.JavaConfig;
import com.walker.spring.service.UseFunctionService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Java配置测试
 *
 * @author qinmu
 * @create 2017-10-11-22:10
 */
public class JavaConfigMain {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(JavaConfig.class);
        UseFunctionService functionService = context.getBean(UseFunctionService.class);
        System.out.println(functionService.sayHello("java config"));
        context.close();
    }
}
